<?php
use Phalcon\Logger as LoggerLevel;

#region 应用配置相关

/**
 * 是否启动签名认证。
 * 如果设置为1,则系统会根据每个控制器和操作的声明来检测请求参数是否进行了加密和签名，并且针对返回内容进行加密和签名。
 * 如果设置为0，则系统不会检测请求参数和响应做加密和签名操作
 * */
$config["app"]["enableSign"] = 0;

/**
 *  encryption key
 */
$config["app"]["cryptKey"] = "";

#endregion

#region 日志相关配置

$config["log"] = array(
    // 为0时，不生成日志
    'log_threshold' => array(LoggerLevel::DEBUG, LoggerLevel::INFO, LoggerLevel::ERROR),
    // 日志路径
    'log_path' => APP_PATH . '/logs/',
    // 日志最大字节（5M）
    'max_size' => 5242880
);

#endregion

#region 数据库配置

$config["database"] = array(
    "master" => array(
        'host' => '127.0.0.1',
        /*'port' => '3306',*/
        'port' => '8066',
        'username' => '',
        'password' => '',
        'dbname' => '',
        'charset' => 'utf8mb4',
        "options" => array(
            PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8MB4'",
            PDO::ATTR_CASE => PDO::CASE_LOWER
        )
    ),
    "slave1" => array(
        'host' => '127.0.0.1',
        'port' => '8066',
        'username' => 'root',
        'password' => '',
        'dbname' => '',
        'charset' => 'utf8mb4',
        "options" => array(
            PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8MB4'",
            PDO::ATTR_CASE => PDO::CASE_LOWER
        )
    )
);

#endregion

#region Redis 配置

$config['redis'] = array(
    "host" => "127.0.0.1",
    "port" => 6379,
    "pconnect" => 0,
    "password" => "",
    "db" => 0,
    "prefix" => "web_svr"
);

#endregion

#region 签名配置

//签名配置
$config["rsa"] = array(
    "request" => array(
        //公钥
        "pubKey" => "",
        //私钥
        "priKey" => ""
    ),
    "response" => array(
        //公钥
        "pubKey" => "",
        //私钥
        "priKey" => ""
    ),
    "database" => array(
        //公钥
        "pubKey" => "",
        //私钥
        "priKey" => ""
    )
);
#endregion

#region

/**
 * JPush 推送相关配置
 */
$config["jPush"] = array(
    "appKey" => "",
    "masterSecret" => ""
);

#endregion

#region

/**
 * 支付宝相关配置
 */
$config["aliPay"] = array(
    // 回调地址
    "returnUrl" => "",
    // 支付宝网关
    "gatewayUrl" => "",
    // APPID
    "appId" => "",
    // 签约的支付宝账号对应的支付宝唯一用户号
    "pId" => "",
    // 开发者私钥去头去尾去回车，一行字符串
    "rsaPrivateKey" => "",
    // 支付宝公钥，一行字符串
    "alipayrsaPublicKey" => "",
    // 支付宝支付回调
    "notifyUrl" => ""
);

#endregion